package com.yxb.user.service;

import com.yxb.user.mapper.UserMapper;
import com.yxb.user.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @PackgeName: com.yxb.user.service
 * @ClassName: UserService
 * @Author: CongR
 * Date: 2021/3/16 10:56
 * project name: springcloud
 * @Version:
 * @Description:
 */
@Service
public class UserService {

    @Autowired
    UserMapper userMapper;

    /**
     * 根据id 查找用户
     * @param id
     * @return
     */
    public User queryById(Long id) {


        return userMapper.selectByPrimaryKey(id);
    }
}
